package cn.kkcxy.blog.system.service.impl.article;

import cn.kkcxy.blog.core.entity.article.ArticleTag;
import cn.kkcxy.blog.core.vo.client.archive.tag.ClientArticleTagsInfoVO;
import cn.kkcxy.blog.system.mapper.article.ArticleTagMapper;
import cn.kkcxy.blog.system.service.article.ArticleTagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author kk
* @description 针对表【article_tag】的数据库操作Service实现
* @createDate 2024-09-18 00:25:54
*/
@Service
public class ArticleTagServiceImpl extends ServiceImpl<ArticleTagMapper, ArticleTag> implements ArticleTagService {

    /**
     * Article Tag Mapper
     */
    @Resource
    private ArticleTagMapper articleTagMapper;

    /**
     * @description: [用户端] 获取文章标签数据
     * @author: kkcxy
     * @date: 2024/9/26 22:25
     * @param: []
     * @return: java.util.List<cn.kkcxy.blog.core.vo.client.archive.tag.ClientArticleTagsInfoVO>
     **/
    @Override
    public List<ClientArticleTagsInfoVO> getArticleTags() {
        return articleTagMapper.selectTagList();
    }

    /**
     * @description: 获得标签总数
     * @author: kkcxy
     * @date: 2024/9/29 0:02
     * @param: []
     * @return: java.lang.Integer
     **/
    @Override
    public Integer getTagCount() {
        return articleTagMapper.getTagCount();
    }
}




